import { MyApp } from './app.component';
import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule, HTTP_INTERCEPTORS } from "@angular/common/http";
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { IonicStorageModule } from '@ionic/storage';

import { IonicImageViewerModule } from 'ionic-img-viewer';
import { MultiPickerModule } from 'ion-multi-picker';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { CodePush } from '@ionic-native/code-push';
import { BLE } from '@ionic-native/ble';
import { Network } from "@ionic-native/network"; 
import { Device } from '@ionic-native/device';
import { JPush } from '@jiguang-ionic/jpush';
import { JmessageChenyu } from "jmessage-chenyu";

import { WechatProvider } from '../providers/wechat/wechat';
import { EventProvider } from '../providers/event/event';
import { StorageProvider } from '../providers/storage/storage';
import { DialogProvider } from '../providers/dialog/dialog';
import { HttpProvider } from '../providers/http/http';
import { HttptimingProvider } from '../providers/httptiming/httptiming';
import { Sha1Provider } from '../providers/sha1/sha1';
import { FilesProvider } from '../providers/files/files';
import { UnitsProvider } from '../providers/units/units';
import { CodepushProvider } from '../providers/codepush/codepush';
import { JpushProvider } from '../providers/jpush/jpush';
import { JmessageProvider } from '../providers/jmessage/jmessage';
import { UserInfoProvider } from '../providers/user-info/user-info';
import { BleProvider } from '../providers/ble/ble';
import { UserDataService } from '../providers/service/user-data.service';
import { HomeDataService } from '../providers/service/home-data.service';
import { AccountDataService } from '../providers/service/account-data.service';
import { ChargDataService } from '../providers/service/charg-data.service';
import { ComplainDataService } from '../providers/service/complain-data.service';
import { ChargstationService } from '../providers/service/chargstation.service';
import { QuestionDataService } from '../providers/service/question-data.service';
import { HelpDataService } from '../providers/service/help-data.service';
import { AboutusDataService } from '../providers/service/aboutus-data.service';
import { OrderDataService } from '../providers/service/order-data.service';
import { MtcDataService } from '../providers/service/mtc.service';
import { DeviceInfoDataService } from '../providers/service/deviceInfo-data.service';
import { CCPeriodDataService } from '../providers/service/cCPeriod-data.service';
import { BaiduMapModule } from 'angular2-baidu-map'
import { Geolocation } from '@ionic-native/geolocation';
import { AppVersion } from '@ionic-native/app-version';
import { InAppBrowser } from '@ionic-native/in-app-browser';
import { NetworkInformationProvider } from '../providers/network-information/network-information';
import { Camera } from '@ionic-native/camera';
import { ImagePicker } from '@ionic-native/image-picker';

@NgModule({
	declarations: [
		MyApp
	],
	imports: [
		BrowserModule,
		HttpClientModule,
		IonicImageViewerModule,
		MultiPickerModule,
		IonicModule.forRoot(MyApp, {
			backButtonText: '',//定义返回按钮名称
			backButtonIcon: 'md-arrow-round-back',//按钮图标样式
			tabsHideOnSubPages: 'true',
			iconMode: 'ios',
			mode: 'ios',
		}),
		IonicStorageModule.forRoot({
			name: '__mydb',
			driverOrder: ['indexeddb', 'sqlite', 'websql']
		})
	],
	bootstrap: [IonicApp],
	entryComponents: [
		MyApp
	],
	providers: [
		StatusBar,
		SplashScreen,
		CodePush,
		Device,
		JPush,
		JmessageChenyu,
		BLE,
		Network,
		[
			{ provide: ErrorHandler, useClass: IonicErrorHandler },
			{ provide: HTTP_INTERCEPTORS, useClass: HttptimingProvider, multi: true }
		],
		WechatProvider,
		EventProvider,
		StorageProvider,
		DialogProvider,
		HttpProvider,
		HttptimingProvider,
		Sha1Provider,
		FilesProvider,
		UnitsProvider,
		CodepushProvider,
		JpushProvider,
		JmessageProvider,
		UserInfoProvider,
		BleProvider,

		UserDataService,
		HomeDataService,
		AccountDataService,
		ChargDataService,
		ComplainDataService,
		ChargstationService,
		QuestionDataService,
		HelpDataService,
		AboutusDataService,
		OrderDataService,
		MtcDataService,
		DeviceInfoDataService,
		CCPeriodDataService,
		Geolocation,
		AppVersion,
		InAppBrowser,
		Camera,
		ImagePicker,
    NetworkInformationProvider,
	]
})
export class AppModule { }